import { Component, Prop, Vue } from "vue-property-decorator";
import './index.scss'
@Component
export default class ProItem extends Vue {
    @Prop({ type: Object, default: () => ({}) }) detail: any

    render(h: any) {
        return (
            <li key={this.detail.id}><a>
                <div class="mobile-img" onClick={() => { this.test(this.detail) }}>
                    <img src={this.detail.img} />
                </div>
                <h3 class="title">{this.detail.name}</h3>
                <p class="desc">{this.detail.title}</p>
                <p class="price"> <span>{this.detail.price}</span>元起</p>
                {/* {this.detail.id===1?<p>我是p标签</p>:<span>我是span标签</span>} */}
                {/* <input value={this.text} onInput={(e :any)=>{this.text=e.target.value}}></input> */}
                {/* {this.arr.map(item => {
                    return <span>{item}</span>
                })} */}
            </a>
            </li>
        )
    }

    test(name: any) {
        console.log('123');
        console.log(name);
    }

    mounted() {
   
    }

}